<template>
  <div style="padding-top:20px">
    <a-row :gutter="16">
      <a-col :span="3">
        <a-menu style="width: 100%" mode="inline" :theme="theme" :selected-keys="[current]" @click="handleClick">
          <a-menu-item key="sjfg">
            <a-icon type="team" style="font-size: 18px" />
            审计分工
          </a-menu-item>
          <a-menu-item key="sysx">
            <a-icon type="database" style="font-size: 18px" />
            所有事项
          </a-menu-item>
          <a-menu-item key="wdsx">
            <a-icon type="solution" style="font-size: 18px" />
            我的事项
          </a-menu-item>
          <a-menu-item key="sjyd">
            <a-icon type="file-exclamation" style="font-size: 18px" />
            审计疑点
          </a-menu-item>
          <a-menu-item key="sjqz">
            <a-icon type="interaction" style="font-size: 18px" />
            审计取证
          </a-menu-item>
          <a-menu-item key="sjdg">
            <a-icon type="folder-open" style="font-size: 18px" />
            审计底稿
          </a-menu-item>
          <a-menu-item key="sjwt">
            <a-icon type="file-unknown" style="font-size: 18px" />
            问题汇总
          </a-menu-item>
          <a-menu-item key="sjrz">
            <a-icon type="read" style="font-size: 18px" />
            审计日志
          </a-menu-item>
        </a-menu>
      </a-col>
      <a-col :span="21">
        <a-card style="position: relative">
          <component
            :is="current"
            :id="id"
            :bsjdwName="bsjdwName"
            :bsjdw="bsjdw"
            :protype="protype"
            :type="type"
            :stage="stage"
            v-bind="$attrs"
          ></component>
        </a-card>
      </a-col>
    </a-row>
  </div>
</template>

<script>
import sjfg from './sjfg/index'
import sysx from './sysx/index'
import wdsx from './wdsx/index'
import sjyd from './sjyd/index'
import sjwt from './sjwt/index'
import sjqz from './sjqz/index'
import sjdg from './sjdg/index'
import sjrz from './sjrz/index'

export default {
  name: 'sssj',
  components: {
    sjfg,
    sysx,
    wdsx,
    sjyd,
    sjwt,
    sjqz,
    sjdg,
    sjrz,
  },
 //isbanRouterParams 禁止使用路由参数   true：标识使用路由参数，false：标识不适用路由参数
  props: ['id', 'bsjdwName', 'bsjdw', 'protype', 'type', 'stage','isbanRouterParams'],
  data() {
    return {
      current: 'sjfg',
      theme: 'light',
    }
  },
  mounted() {
    if (this.$route.query && this.$route.query.activeMenu&&this.isbanRouterParams) {
      let { activeMenu } = this.$route.query
      this.current = activeMenu
    }
  },
  methods: {
    handleClick(e) {
      this.current = e.key
    },
  },
}
</script>

<style lang="less" scoped>
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
  background-color: #e6f7ff !important;
}
</style>